package com.briup.recognition.utils;

import java.util.Date;

/**
 * @program: test
 * @description: 消息工具
 * @author: charles
 * @create: 2021-03-28 09:02
 **/

public class MessageUtil {

    // 返回更新操作-成功消息
    public static Message success(String message){
        Message msg =
                new Message(20000,message,null,new Date().getTime());
        return msg;
    }
    // 返回查询操作-成功消息
    public static Message success(Object data){
        Message msg =
                new Message(20000,"success",data,new Date().getTime());
        return msg;
    }

    // 返回错误消息
    public static Message error(int status,String message) {
        Message msg = new Message(status,message,null,new Date().getTime());
        return msg;
    }

}
